package dlg.code.proxy.staticproxy;

import dlg.code.proxy.IRender;

/**
 * 静态代理
 * 每个代理对象都要写一个代理类
 */
public class RenderProxy implements IRender {

    private final IRender render;

    public RenderProxy(IRender render) {
        this.render = render;
    }

    @Override
    public void rent() {
        look();
        render.rent();
    }

    private void look() {
        System.out.println("看房");
    }
}
